<!DOCTYPE html>
<html>
<head>
<script>
	var d, str;
	window.onload = window.onscroll = function () {
		d = document.getElementById("d");
		str = "<strong>" + ((document.compatMode.toLowerCase().indexOf("back") >= 0) ? "Quirks" : "Standards") + "</strong><br />"
			+ "document.documentElement.scrollTop:" + document.documentElement.scrollTop + "<br />"
			+ "document.documentElement.scrollLeft:" + document.documentElement.scrollLeft + "<br />"
			+ "document.body.scrollTop:" + document.body.scrollTop + "<br />"
			+ "document.body.scrollLeft:" + document.body.scrollLeft;
		d.innerHTML = str;
	}
</script>
</head>
<body style="font:12px Arial; _background-attachment:fixed; _background-image:url(about:blank);">
<div style="width:10000px; height:10000px;"></div>
<div id="d" style="position:fixed; top:0; left:0; _position:absolute; _top:expression(offsetParent.scrollTop); _left:expression(offsetParent.scrollLeft); background:#ddd;"></div>
</body>
</html>